﻿using DXApplicationTangche.UC.订单.service;
using DXApplicationTangche.UC.销售台账.service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DXApplicationTangche.UC.销售台账.model
{
    public class 销售台账Model
    {
        public List<OrderStatusSaleIndexDTO> 订单状态尺寸清洗(List<OrderStatusSaleIndexDTO> list)
        {
            foreach (OrderStatusSaleIndexDTO 销售台账DTO in list)
            {
                try { 销售台账DTO.styleSizeCd = 销售台账DTO.styleSizeCd.Replace("IGS_GROUP_SIZE-", "").Replace("EGS_GROUP_SIZE-", ""); } catch { }
                if (销售台账DTO.orderStatus.Equals(Const订单状态.NOT_SCHEDULED))
                {
                    销售台账DTO.orderStatus = "未排产";
                }
                else if (销售台账DTO.orderStatus.Equals(Const订单状态.SCHEDULED))
                {
                    销售台账DTO.orderStatus = "已排产";
                }
                else if (销售台账DTO.orderStatus.Equals(Const订单状态.WIP))
                {
                    销售台账DTO.orderStatus = "在制品";
                }
                else if (销售台账DTO.orderStatus.Equals(Const订单状态.DONE))
                {
                    销售台账DTO.orderStatus = "完成";
                }
                else if (销售台账DTO.orderStatus.Equals(Const订单状态.CANCEL))
                {
                    销售台账DTO.orderStatus = "取消";
                }
            }
            return list;
        }
    }
}
